

<!DOCTYPE html>
<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
<head>
  <meta charset="utf-8">
  
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  
  <title>f90doc — Fortran 90 source code scanner &mdash; quippy 7ea04c5+ documentation</title>
  

  
  
    <link rel="shortcut icon" href="_static/favicon.ico"/>
  
  
  

  
  <script type="text/javascript" src="_static/js/modernizr.min.js"></script>
  
    
      <script type="text/javascript" id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
        <script type="text/javascript" src="_static/jquery.js"></script>
        <script type="text/javascript" src="_static/underscore.js"></script>
        <script type="text/javascript" src="_static/doctools.js"></script>
        <script type="text/javascript" src="_static/language_data.js"></script>
        <script async="async" type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/latest.js?config=TeX-AMS-MML_HTMLorMML"></script>
        <script type="text/x-mathjax-config">MathJax.Hub.Config({"tex2jax": {"processClass": "math|output_area", "processEscapes": true, "ignoreClass": "document", "inlineMath": [["$", "$"], ["\\(", "\\)"]]}})</script>
    
    <script type="text/javascript" src="_static/js/theme.js"></script>

    

  
  <link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
  <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
  <link rel="stylesheet" href="_static/theme_overrides.css" type="text/css" />
    <link rel="index" title="Index" href="genindex.html" />
    <link rel="search" title="Search" href="search.html" />
    <link rel="next" title="f2py_wrapper_gen — Fortran 90 source code wrapping" href="f2py_wrapper_gen.html" />
    <link rel="prev" title="Appendix: wrapping Fortran 90 Code" href="fortran_wrapper.html" /> 
</head>

<body class="wy-body-for-nav">

   
  <div class="wy-grid-for-nav">
    
    <nav data-toggle="wy-nav-shift" class="wy-nav-side">
      <div class="wy-side-scroll">
        <div class="wy-side-nav-search" >
          

          
            <a href="index.html" class="icon icon-home"> quippy
          

          
            
            <img src="_static/hybrid.png" class="logo" alt="Logo"/>
          
          </a>

          
            
            
              <div class="version">
                7ea04c5+
              </div>
            
          

          
<div role="search">
  <form id="rtd-search-form" class="wy-form" action="search.html" method="get">
    <input type="text" name="q" placeholder="Search docs" />
    <input type="hidden" name="check_keywords" value="yes" />
    <input type="hidden" name="area" value="default" />
  </form>
</div>

          
        </div>

        <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
          
    
            
            
              
            
            
              <ul class="current">
<li class="toctree-l1"><a class="reference internal" href="intro.html">Introduction to <code class="docutils literal notranslate"><span class="pre">quippy</span></code></a></li>
<li class="toctree-l1"><a class="reference internal" href="install.html">Installation of QUIP and quippy</a></li>
<li class="toctree-l1"><a class="reference internal" href="Tutorials/index.html">Tutorials</a></li>
<li class="toctree-l1"><a class="reference internal" href="quippy.html">Quippy library reference</a></li>
<li class="toctree-l1"><a class="reference internal" href="visualisation.html">Visualisation Tools</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="fortran_wrapper.html">Appendix: wrapping Fortran 90 Code</a><ul class="current">
<li class="toctree-l2 current"><a class="current reference internal" href="#"><code class="docutils literal notranslate"><span class="pre">f90doc</span></code> — Fortran 90 source code scanner</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#command-line-usage">Command line usage</a></li>
<li class="toctree-l3"><a class="reference internal" href="#module-usage">Module usage</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="f2py_wrapper_gen.html"><code class="docutils literal notranslate"><span class="pre">f2py_wrapper_gen</span></code> — Fortran 90 source code wrapping</a></li>
<li class="toctree-l2"><a class="reference internal" href="patch_f2py.html"><code class="docutils literal notranslate"><span class="pre">patch_f2py</span></code> — modify <code class="docutils literal notranslate"><span class="pre">numpy.f2py</span></code> at runtime</a></li>
<li class="toctree-l2"><a class="reference internal" href="oo_fortran.html">Fortran 90 derived-type support</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="teach_sparse.html">Command line options of the teach_sparse main program</a></li>
</ul>

            
          
    <p></p>
    <ul>
        <li><a href="genindex.html">Index</a></li>
        <li><a href="py-modindex.html">Module Index</a></li>
        <li><a href="search.html">Search Page</a></li>
        <li><a href="_modules/index.html">Module Source Code</a></li>
    </ul>
  
        </div>
      </div>
    </nav>

    <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">

      
      <nav class="wy-nav-top" aria-label="top navigation">
        
          <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
          <a href="index.html">quippy</a>
        
      </nav>


      <div class="wy-nav-content">
        
        <div class="rst-content">
        
          















<div role="navigation" aria-label="breadcrumbs navigation">

  <ul class="wy-breadcrumbs">
    
      <li><a href="index.html">Docs</a> &raquo;</li>
        
          <li><a href="fortran_wrapper.html">Appendix: wrapping Fortran 90 Code</a> &raquo;</li>
        
      <li><code class="docutils literal notranslate"><span class="pre">f90doc</span></code> — Fortran 90 source code scanner</li>
    
    
      <li class="wy-breadcrumbs-aside">
        
            
            <a href="_sources/f90doc.rst.txt" rel="nofollow"> View page source</a>
          
        
      </li>
    
  </ul>

  
  <hr/>
</div>
          <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
           <div itemprop="articleBody">
            
  
<style>
/* CSS overrides for sphinx_rtd_theme */

/* 24px margin */
.nbinput.nblast,
.nboutput.nblast {
    margin-bottom: 19px;  /* padding has already 5px */
}

/* ... except between code cells! */
.nblast + .nbinput {
    margin-top: -19px;
}

.admonition > p:before {
    margin-right: 4px;  /* make room for the exclamation icon */
}

/* Fix math alignment, see https://github.com/rtfd/sphinx_rtd_theme/pull/686 */
.math {
    text-align: unset;
}
</style>
<div class="section" id="module-f90doc">
<span id="f90doc-fortran-90-source-code-scanner"></span><h1><a class="reference internal" href="#module-f90doc" title="f90doc: Read Fortan 90 sources and extract documenataion strings"><code class="xref py py-mod docutils literal notranslate"><span class="pre">f90doc</span></code></a> — Fortran 90 source code scanner<a class="headerlink" href="#module-f90doc" title="Permalink to this headline">¶</a></h1>
<p><a class="reference internal" href="#module-f90doc" title="f90doc: Read Fortan 90 sources and extract documenataion strings"><code class="xref py py-mod docutils literal notranslate"><span class="pre">f90doc</span></code></a> can be used either as a command line tool or as a module.</p>
<div class="section" id="command-line-usage">
<h2>Command line usage<a class="headerlink" href="#command-line-usage" title="Permalink to this headline">¶</a></h2>
<p>When used as a command line program it reads from the Fortran source
files given as arguments and writes LaTeX source to <code class="file docutils literal notranslate"><span class="pre">stdout</span></code>. The
program accepts the following options:</p>
<dl class="cmdoption">
<dt id="cmdoption-f90doc-t">
<code class="descname">-t</code><code class="descclassname"> &lt;title&gt;</code><a class="headerlink" href="#cmdoption-f90doc-t" title="Permalink to this definition">¶</a></dt>
<dd><p>specify a title.</p>
</dd></dl>

<dl class="cmdoption">
<dt id="cmdoption-f90doc-a">
<code class="descname">-a</code><code class="descclassname"> &lt;author&gt;</code><a class="headerlink" href="#cmdoption-f90doc-a" title="Permalink to this definition">¶</a></dt>
<dd><p>specify an author.</p>
</dd></dl>

<dl class="cmdoption">
<dt id="cmdoption-f90doc-i">
<code class="descname">-i</code><code class="descclassname"> &lt;intro&gt;</code><a class="headerlink" href="#cmdoption-f90doc-i" title="Permalink to this definition">¶</a></dt>
<dd><p>specify introductory LaTeX file to be included.</p>
</dd></dl>

<dl class="cmdoption">
<dt id="cmdoption-f90doc-n">
<code class="descname">-n</code><code class="descclassname"></code><a class="headerlink" href="#cmdoption-f90doc-n" title="Permalink to this definition">¶</a></dt>
<dd><p>don’t use an introductory LaTeX file.</p>
</dd></dl>

<dl class="cmdoption">
<dt id="cmdoption-f90doc-s">
<code class="descname">-s</code><code class="descclassname"></code><a class="headerlink" href="#cmdoption-f90doc-s" title="Permalink to this definition">¶</a></dt>
<dd><p>use short documentation format.</p>
</dd></dl>

<dl class="cmdoption">
<dt id="cmdoption-f90doc-l">
<code class="descname">-l</code><code class="descclassname"></code><a class="headerlink" href="#cmdoption-f90doc-l" title="Permalink to this definition">¶</a></dt>
<dd><p>write latex output to <code class="file docutils literal notranslate"><span class="pre">stdout</span></code>.</p>
</dd></dl>

</div>
<div class="section" id="module-usage">
<h2>Module usage<a class="headerlink" href="#module-usage" title="Permalink to this headline">¶</a></h2>
<p>The only function that is designed to be used when <a class="reference internal" href="#module-f90doc" title="f90doc: Read Fortan 90 sources and extract documenataion strings"><code class="xref py py-mod docutils literal notranslate"><span class="pre">f90doc</span></code></a> is
imported as a module is <a class="reference internal" href="#f90doc.read_files" title="f90doc.read_files"><code class="xref py py-func docutils literal notranslate"><span class="pre">read_files()</span></code></a>.  The classes
<code class="xref py py-class docutils literal notranslate"><span class="pre">f90doc.C_prog</span></code>, <code class="xref py py-class docutils literal notranslate"><span class="pre">f90doc.C_module</span></code>,
<code class="xref py py-class docutils literal notranslate"><span class="pre">f90doc.C_subt</span></code>, <code class="xref py py-class docutils literal notranslate"><span class="pre">f90doc.C_funct</span></code>,
<code class="xref py py-class docutils literal notranslate"><span class="pre">f90doc.C_decl</span></code> and <code class="xref py py-class docutils literal notranslate"><span class="pre">f90doc.C_interface</span></code> contain the
implementation of LaTeX output code, with each class represnting
structures in the Fortran code.</p>
<dl class="function">
<dt id="f90doc.read_files">
<code class="descclassname">f90doc.</code><code class="descname">read_files</code><span class="sig-paren">(</span><em>in_files</em><span class="sig-paren">)</span><a class="headerlink" href="#f90doc.read_files" title="Permalink to this definition">¶</a></dt>
<dd><p>Read Fortran 90 sources from the list of filenames <cite>in_files</cite>, and return
a tuple <cite>(programs, modules, functs, subts)</cite>.</p>
<p><cite>programs</cite> is a list of pairs of instances of <code class="xref py py-class docutils literal notranslate"><span class="pre">f90doc.C_prog</span></code> and program names,
<cite>modules</cite> is a list of pairs of instances of <code class="xref py py-class docutils literal notranslate"><span class="pre">f90doc.C_module</span></code> and module names,
<cite>functs</cite> is a list of pairs of instances of <code class="xref py py-class docutils literal notranslate"><span class="pre">f90doc.C_funct</span></code> and function names
<cite>subts</cite> is a list of pairs of instances of <code class="xref py py-class docutils literal notranslate"><span class="pre">f90doc.C_subt</span></code> and subroutine names</p>
<p>For example, to print the names of all modules defined in a list of filenames <cite>in_files</cite>:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">programs</span><span class="p">,</span> <span class="n">modules</span><span class="p">,</span> <span class="n">functs</span><span class="p">,</span> <span class="n">subts</span> <span class="o">=</span> <span class="n">f90doc</span><span class="o">.</span><span class="n">read_files</span><span class="p">(</span><span class="n">in_files</span><span class="p">)</span>
<span class="k">for</span> <span class="n">mod</span><span class="p">,</span> <span class="n">name</span> <span class="ow">in</span> <span class="n">modules</span><span class="p">:</span>
   <span class="nb">print</span> <span class="n">name</span>
</pre></div>
</div>
</dd></dl>

</div>
</div>


           </div>
           
          </div>
          <footer>
  
    <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
      
        <a href="f2py_wrapper_gen.html" class="btn btn-neutral float-right" title="f2py_wrapper_gen — Fortran 90 source code wrapping" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
      
      
        <a href="fortran_wrapper.html" class="btn btn-neutral float-left" title="Appendix: wrapping Fortran 90 Code" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
      
    </div>
  

  <hr/>

  <div role="contentinfo">
    <p>
        &copy; Copyright 2008-2016, James Kermode

    </p>
  </div>
  Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>. 

</footer>

        </div>
      </div>

    </section>

  </div>
  


  <script type="text/javascript">
      jQuery(function () {
          SphinxRtdTheme.Navigation.enable(true);
      });
  </script>

  
  
    
   

</body>
</html>